package com.xc.freeapp.account.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;
import com.xc.freeapp.bean.AuthInfo;
import com.xc.freeapp.exception.BaseException;
import com.xc.freeapp.service.TakemedicService;
import com.xc.freeapp.util.AuthUtil;
import com.xc.freeapp.util.TokenAnnotation;
@Controller
@RequestMapping("/memorandum")
@Api(value="/memorandum",description = "备忘录")
public class MemorandumController extends AbstractController {
	@Autowired
	private TakemedicService takemedicservice;

	/**
	 * 备忘录
	 * 
	 * @throws BaseException
	 */
	@TokenAnnotation(required=true)
	@RequestMapping(value = "", method = RequestMethod.GET)
	@ResponseBody
	@ApiOperation(value = "备忘录")
	public Map<String, Object> getmemorandum() throws BaseException {
		AuthInfo authInfo = AuthUtil.getAuthInfo(getRequest());

		log.info("备忘录" + authInfo.getUserId() + "访问");

		return takemedicservice.getremindamount(authInfo.getUserId());
	}
}
